#pragma once

//#include "DXAMLCommon.h"
//
//#include "CValue.h"
////#include "CDependencyObject.h"
//#include "CDependencyProperty.h"
//
//#include "Property.h"
//#include "RenderProperty.h"

class CDependencyObject;
struct Property;
struct RenderProperty;
class CDependencyProperty;


typedef void (__stdcall *PFNParentRenderChangedHandler)(CDependencyObject *,DirtyFlags::Value);

typedef int (__stdcall *CGPFN)(CDependencyObject *, CDependencyProperty *, UINT);




class CMetaData
{
public: 
	CMetaData();
	~CMetaData();
	virtual XUINT32 GetBaseType();
	virtual CXString * GetName();
	virtual XINT32 IsClass();
	virtual XINT32 IsProperty();
	virtual XINT32 IsOnDemandProperty();
	virtual XINT32 IsEventHandler();
	virtual XINT32 IsManaged();
	virtual XINT32 IsAttachedProperty();
	XBOOL IsInheritedAttachedPropertyInStorageGroup();
	XBOOL IsSlotlessInheritedProperty();
	virtual XINT32 IsEffectivelyReadOnlyProperty();
	virtual XINT32 IsReadOnlyProperty();
	virtual XINT32 IsParserOnlyWriteProperty();
	virtual XINT32 IsHiddenProperty();
	XINT32 IsCustomProperty();
	XINT32 IsCustomClass();
	XBOOL IsAbstractClass();
	XBOOL IsStaticClass();


	/*this+0x4*/CXString * m_pstrName;
	/*this+0x8*/void * m_hType;
	/*this+0xC*/XUINT32 m_flags;
	/*this+0x10*/XUINT16 m_nIndex;
	/*this+0x12*/XUINT16 m_nBase;


	union
	{
		/*this+0x14*/struct Property * m_aProperty;
		/*this+0x14*/CGPFN  * m_cgpfn;
	};


	union
	{
		/*this+0x18*/struct RenderProperty * m_aRenderProperties;
		struct
		{
			/*this+0x18*/XUINT16 m_nOwner;
			/*this+0x1A*/XUINT16 m_nValueType;
		};

	};


	union
	{
		/*this+0x1C*/XUINT16 m_nNamespace;
		/*this+0x1C*/XUINT16 m_nSlot;
	};


	union
	{
		/*this+0x1E*/XUINT16 m_nInheritanceDepth;
		/*this+0x1E*/XUINT16 m_nOffset;
	};



	union
	{
		/*this+0x20*/XUINT16 m_cProperty;
		/*this+0x20*/XUINT16 m_nGroupOffset;
	};

	/*this+0x24*/XUINT16 m_nContent;

	PFNParentRenderChangedHandler  * m_pfnNWRenderChangedHandler;
};


